home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / sprite / include / sys / h-sun4.h < prev   
Encoding:
C/C++ Source or Header  |  1991-08-30  |  2.8 KB  |  130 lines

  1. #include <fcntl.h>
  2. #include <errno.h>
  3. #include <stdio.h>
  4. #include <sys/types.h>
  5. #include <sys/stat.h>
  6. #include <ctype.h>
  7. #include <string.h>
  8. #include <sys/file.h>
  9. #ifndef O_ACCMODE
  10. #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
  11. #endif
  12. #define SEEK_SET 0
  13. #define SEEK_CUR 1
  14.  
  15. extern PROTO(int, abort,(void));
  16. extern PROTO(int, close,(int));
  17. extern PROTO(int, fcntl,(int des, int cmd, int e));
  18. #ifndef sprite
  19. extern PROTO(int, fprintf,(FILE *,char *,...));
  20. extern PROTO(int, printf,(char *,...));
  21. #endif
  22. extern PROTO(int, qsort,(void *data,int els, int siz, int func()));
  23. extern PROTO(void, exit,(int));
  24. #ifndef sprite
  25. extern PROTO(int, fseek,(FILE*, int, int));
  26. #endif
  27. extern PROTO(int, fclose,(FILE*));
  28. extern PROTO(void, bcopy,(char*,char*,int));
  29. extern PROTO(int, bcmp,(char *, char *, int));
  30. extern PROTO(void, bzero,(char *, int));
  31. #ifndef sprite
  32. extern PROTO(PTR,memset,(PTR, int,unsigned int));
  33. #endif
  34. #ifndef __GNUC__
  35. PROTO(PTR, memcpy,(PTR,CONST PTR,unsigned int));
  36. #else
  37. /* PROTO(char *, memcpy,(char *,CONST char *,unsigned int)); */
  38. #endif
  39.  
  40. extern PROTO(int,getuid,());
  41. extern PROTO(int,getgid,());
  42. extern char * strchr();
  43. extern PROTO(void, perror,(CONST char *));
  44. extern char *getenv();
  45. extern char *memchr();
  46. extern char *strrchr();
  47. extern int chmod();
  48. extern int fread();
  49. extern int fstat();
  50. extern int fwrite();
  51. extern int sscanf();
  52. extern int stat();
  53. extern int strtol();
  54. #ifndef DONTDECLARE_MALLOC
  55. extern PROTO(PTR,malloc,(unsigned));
  56. extern PROTO(PTR ,realloc, (PTR, unsigned));
  57. #endif
  58.  
  59. extern PROTO(int, free,(PTR));
  60.  
  61.  
  62. extern char *strrchr();
  63. extern char *ctime();
  64. extern int _flsbuf();
  65. extern int fclose();
  66. extern int time();
  67. extern int utimes();
  68. extern int vfprintf();
  69. extern long atol();
  70. extern char *getenv();
  71. extern int fputc();
  72. extern int unlink();
  73.  
  74.  
  75. /* EXACT TYPES */
  76. typedef char int8e_type;
  77. typedef unsigned char uint8e_type;
  78. typedef short int16e_type;
  79. typedef unsigned short uint16e_type;
  80. typedef int int32e_type;
  81. typedef unsigned int uint32e_type;
  82.  
  83.  
  84. #ifdef __GNUC__
  85. typedef unsigned long long uint64e_type;
  86.  
  87. #else
  88. typedef struct {
  89.   uint32e_type low, high;
  90. } uint64e_type;
  91.  
  92. #endif
  93. /* CORRECT SIZE OR GREATER */
  94. typedef char int8_type;
  95. typedef unsigned char uint8_type;
  96. typedef short int16_type;
  97. typedef unsigned short uint16_type;
  98. typedef int int32_type;
  99. typedef unsigned int uint32_type;
  100.  
  101. #ifdef __GNUC__
  102. typedef unsigned long long uint64_type;
  103. typedef long long int64_type;
  104. #else
  105. typedef struct {
  106.   uint32e_type low, high;
  107. } uint64_type;
  108.  
  109. typedef struct {
  110.   uint32e_type low, high;
  111. } int64_type;
  112.  
  113. #endif
  114.  
  115.  
  116. #define BYTES_IN_PRINTF_INT 4
  117. #ifndef __GNUC__
  118. #define uint64_typeLOW(x) (uint32_type)(((x).low))
  119. #define uint64_typeHIGH(x) (uint32_type)(((x).high))
  120. #else
  121. #define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
  122. #define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
  123. #endif
  124.  
  125. #ifdef sprite 
  126. #ifndef HOST_PAGE_SIZE
  127. #define    HOST_PAGE_SIZE    8192
  128. #endif
  129. #endif
  130.